$(document).ready(function() { $('#frm_VideoConsultation').validate({ submitHandler: function (form) { $(".submitVideoConsultation").html("Sending..."); $(".submitVideoConsultation").attr("disabled", true); form.submit(); } }); $('#frm_VideoConsultation #select_all').on('change', function() { $('#frm_VideoConsultation .chkgdpr input[type="checkbox"]').prop('checked', this.checked); }); $('#frm_VideoConsultation .chkgdpr input[type="checkbox"]').on('change', function() { {$('#frm_VideoConsultation #select_all').prop('checked', true);} }); $('#frm_VideoConsultation .chkgdpr input[type="checkbox"]').on('change', function () { var allChecked = $('#frm_VideoConsultation .chkgdpr input:checked').length === 0; if (allChecked === true) {$('#frm_VideoConsultation #select_all').prop('checked', false);} }); $('#frm_VideoConsultation .expand-content-link').click(function(){ $('#frm_VideoConsultation .hidden-legal-content').slideToggle('slow'); return false; }); }); $(function () { $('[data-toggle="tooltip"]').tooltip() })